import request from '@/utils/request'
import {type LoginData} from './type'
import {type TraceabilityIndexData} from './type'
import {type delall} from './type'
import {type Pic,type UpdateHusbandryMes,type Helth,type HusbandryEnterprise,type Slaughter} from './type'
//admin的所有的接口调用

/**
 * 
 * @param data 
 * @returns 
 */
  export function Login(data:LoginData){
    
    return request({
        //url:"/api/FarmingManagement/GetLogin",
        url:"/Account/GetLogin",
        method:"post",
        data
    });

  }
  export function getlogin(){
    
    return request({
        //url:"/api/FarmingManagement/GetLogin",
        url:"/Account/GetAdmin",
        method:"post",
       
    });
   

  }
  export function GetTraceabilityIndex(){
    
    return request({
        //url:"/api/FarmingManagement/GetLogin",
        url:"/Traceability/GetTraceabilityIndexList",
        method:"post",
       
    });
  }
  export function AddTraceabilityIndex(data:TraceabilityIndexData){
    
    return request({
        url:"/Traceability/AddTraceabilityIndex",
        method:"post",
       data
    });
  }
  export function GetTraceabilityIndexById(data:number){
    
    return request({
        url:"/Traceability/GetTraceabilityIndexById?Id="+data,
        method:"get",
       data
    });
  }
  export function ModifyTraceabilityIndexAll(data:TraceabilityIndexData){
    
    return request({
        url:"/Traceability/ModifyTraceabilityIndex",
        method:"post",
       data
    });
  }
  export function DelTraceabilityIndexById(data:number){
    
    return request({
        url:"/Traceability/DelTraceabilityIndexById?Id="+data,
        method:"get",
       data
    });
  }
  export function DelAllTraceabilityIndex(data:delall){
    
    return request({
        url:"/Traceability/DelAllTraceabilityIndex",
        method:"post",
       data
    });
  }
  export function AddPic(data:Pic){
    
    return request({
        url:"/Traceability/ModifyPic",
        method:"post",
       data
    });
  }
  export function DelPicc(data:Pic){
    return request({
        url:"/Traceability/ModifyDelPic",
        method:"post",
       data
    });
  }
  export function HusbandryMessage(){
    return request({
        url:"/Traceability/GetHusbandryMessages",
        method:"get",
       
    });
  }
  export function UpdateHusbandryMessage(data:UpdateHusbandryMes){
    return request({
        url:"/Traceability/UpdateHusbandryMessages",
        method:"post",
        data
    });
  }
  export function GetTrace(){
    return request({
        url:"/Traceability/GetTrace",
        method:"get",
       
    });
  }
  export function GetHealth(){
    return request({
        url:"/Traceability/GetHealthInformation",
        method:"get",
    });
  }
  export function AddHealth(data:Helth){
    return request({
        url:"/Traceability/AddHealthInformation",
        method:"post",
        data
    });
  }
  export function updateHealth(data:Helth){
    return request({
        url:"/Traceability/UpdateHealthInformation",
        method:"post",
        data
    });
  }
  export function GetHealthById(data:any){
    return request({
        url:"/Traceability/GetHealthById?Id="+data,
        method:"get",
        
    });
  }
  export function GetLog(){
    return request({
        url:"/Traceability/GetCustomActionModels",
        method:"get",
        
    });
  }
  export function GetHusbandryEnterprises(){
    return request({
        url:"/Traceability/GetHusbandryEnterprise",
        method:"get",
        
    });
  }
  export function GetHusbandryEnterpriseImages(){
    return request({
        url:"/Traceability/GetHusbandryEnterpriseImages",
        method:"get",
        
    });
  }
  export function ModifyHusbandryEnterpriseImages(data:Pic){
    return request({
        url:"/Traceability/ModifyHusbandryEnterpriseImages",
        method:"post",
        data
    });
  }
  export function ModifyDelHusbandryEnterpriseImages(data:Pic){
    return request({
        url:"/Traceability/ModifyDelHusbandryEnterpriseImages",
        method:"post",
        data
    });
  }
  export function ModifyHusbandryEnterpriseCorporatePhotoImages(data:Pic){
    return request({
        url:"/Traceability/ModifyHusbandryEnterpriseCorporatePhotoImages",
        method:"post",
        data
    });
  }
  export function ModifyDelHusbandryEnterpriseCorporatePhotoImages(data:Pic){
    return request({
        url:"/Traceability/ModifyDelHusbandryEnterpriseCorporatePhotoImages",
        method:"post",
        data
    });
  }
  export function ModifyUpdateHusbandryEnterprise(data:HusbandryEnterprise){
    return request({
        url:"/Traceability/UpdateHusbandryEnterprise",
        method:"post",
        data
    });
  }
  export function GetSlaughterInformation(){
    return request({
        url:"/Traceability/GetSlaughterInformation",
        method:"get",
       
    });
  }
  export function UpdateSlaughterInformation(data:Slaughter){
    return request({
        url:"/Traceability/UpdateSlaughterInformation",
        method:"post",
        data
    });
  }

  export function GetSlaughterImages(){
    return request({
        url:"/Traceability/GetSlaughterImages",
        method:"get",
       
    });
  }
  export function AddRelevantQualificationSlaughterImages(data:Pic){
    return request({
        url:"/Traceability/AddRelevantQualificationSlaughterImages",
        method:"post",
        data
    });
  }
  export function UpdateRelevantQualificationSlaughterImages(data:Pic){
    return request({
        url:"/Traceability/UpdateRelevantQualificationSlaughterImages",
        method:"post",
        data
    });
  }
  export function AddCorporatePhotoSlaughterImages(data:Pic){
    return request({
        url:"/Traceability/AddCorporatePhotoSlaughterImages",
        method:"post",
        data
    });
  }
  export function UpdateCorporatePhotoSlaughterImages(data:Pic){
    return request({
        url:"/Traceability/UpdateCorporatePhotoSlaughterImages",
        method:"post",
        data
    });
  }